﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Inovout.Web.Mvc
{
    public class WidgetModelValidatorProvider : DataAnnotationsModelValidatorProvider
    {
        protected override IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ControllerContext context, IEnumerable<Attribute> attributes)
        {
            attributes = ((WidgetModelMetadata)metadata).PrototypeWidgetCache.Attributes;
           return base.GetValidators(metadata, context, attributes);
        }
    }
}
